package com.visec.hdy.transmission.rmi;

import java.rmi.Remote;

import com.visec.hdy.transmission.rmi.code.RMIClient;
import com.visec.hdy.transmission.rmi.code.RMIServer;
import com.visec.hdy.transmission.rmi.code.RMIServerImp;
import com.visec.hdy.transmission.rmi.config.RMIModel;

public class RMIFactory {
	protected RMIFactory() {

	}

	public static RMIFactory getInstance() {
		return new RMIFactory();
	}

	public <T extends Remote> RMIClient createClient(RMIModel m) {
		return RMIServerImp.instanceClient(m);
	}

	public <T extends Remote> RMIServer createServer(RMIModel m) {
		return RMIServerImp.instanceServer(m);
	}

}
